How to initialized a Data types and Variables in C#.
Datatypes and Variables
1023
13-Jun-2018
Prakash nidhi Verma
13-Jun-2018Variables and Data types in c# :
variables like a buckets which stored data value of the type declaration. some steps for follow to declare them is shown below:
Step 1: Declaring variables and Assigning values :
they stored information in string type var. syntax:
bucket with the name that unique identifies if:
we declared first name and referenced the erroneously redeclared it.
string name ="Mindstick"
step2-
lets we have two buckets Firstname(string type) and name(mindstick) and put the name value into another.
FirstName = name;
var dumping its value into another buckets .boths are hold literal string "mindstick".
step3- Understanding var naming limitations:
-Be atleast one alphabetic char
-not start with a numberacly
-not use of dash- and underscore_
-not contain any space between words.
step4- Adding comments in code
all primitivec# data types : bytes , sbytes, short, ushort, int,long,float,double,dec,char,string,bool,objects etc.
Happy coding :)